;
import $ from "jquery";
import '../css/reset.css';
import "../css/iconfont.css";

import header from "../components/header/header";
import footer from "../components/footer/footer";
import indexModel from "../models/index";

(function($){
    const $app = $("#app"),
        $container = $("<div class='container'></div>");

    const getData = new indexModel(),
        navData = getData.getNavData();

    const init = ()=>{
        render()
    };

    function render(){
        let headerComponent = header(navData).tpl();
        let footerComponent = footer().tpl();
        $container.append(headerComponent);
        $container.append(footerComponent);
        $app.append($container);
    }

    init()
})($);
